<?php $this->load->view('header'); ?>
<div id="search-project">
	<?php echo $this->load->view('sideBlocks/searchBlock') ?>
</div>

<div class="wrap-content-app wrap-project wrap-detail-project">
<div class="container">
<div class=""> <!--row-->
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12  profile-user">
	<div class="border col-md-1"></div>
	<div class="container">
		<div class="row title-project">
			<h2><?php echo $this->lang->line('Pick Provider');?></h2>
		</div>
	</div>
	<div class="row">
	<form method="post" id="form-pick" action="<?php echo site_url('project/awardBid');?>">
		<table cellpadding="2" cellspacing="1" width="96%">	
			<thead>
				<tr>
					<td width="10%" class="dt">
						<?php echo $this->lang->line('Pick');?></td> 
					<td width="20%" class="dt"> <?php echo $this->lang->line('Programmers');?> </td>
					<td width="20%" class="dt"> <?php echo $this->lang->line('Bid');?> </td>
                    <td width="20%" class="dt"> <?php echo $this->lang->line('Escrow');?> </td>
					<td width="20%" class="dt"> <?php echo $this->lang->line('Delivery Time');?> </td>
				</tr>
			</thead>
			<tbody>
		  	<?php
		  		$isPick = false;
				if(isset($bids) and $bids->num_rows()>0)
				{
					$i=1;
					foreach($bids->result() as $bid)
					{
						if($bid->user_id == $bid->programmer_id){
							$isPick = true;
						}
			?>
			  <tr>
				<td> 
				<input type="radio" name="bidid" value="<?php echo $bid->id;?>" <?php if($bid->user_id == $bid->programmer_id) echo "checked";?>/></td>
				<td>
                    <a href="<?php echo site_url('programmer/viewProfile/'.$bid->user_id);?>"><?php echo $bid->user_name;?></a>
				</td>
				<td>  $<?php echo $bid->bid_amount;?> </td>
                  <td>  $<?php echo $bid->escrow_flag;?> </td>
                  <td>  <?php echo $bid->bid_days.$this->lang->line('days');?>&nbsp;<?php if($bid->bid_hours != 0) echo $bid->bid_hours.$this->lang->line('hours');?> </td>

				
				</tr>
			  <?php		
						$i++;						
					}//For Each End - Latest Project Traversal															
				}//If - End Check For Latest Projects
			  ?>
			</tbody>
		   </table>
		   <?php if($isPick == false){?>
		   <p><input type="submit" name="pickBid" class="clsSmall" value="<?php echo $this->lang->line('Pick Bid');?>"></p>
		    <?php } ?>
		 </form>
                           
                
             
            </div>
          </div>
        </div>
      </div>
      <!--END OF POST PROJECT-->
    </div>
<!--END OF MAIN-->
<?php $this->load->view('footer'); ?>